package labs;

import java.util.Scanner;
/*
 * INGRESE ENTERO Y LUEGO IMPRIMA, CUANTOS DIGITOS PARES E IMPARES TIENE
 */

public class DemoWhile05 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        System.out.print("Valor: ");
        String vslor = scanner.nextLine();

        int x = Integer.valueOf(vslor).intValue();

        int sum = 0;
        int par = 0, imp = 0;

        while (x > 0) {
            int dig = (x % 10);

            int z = ((dig % 2) == 0) ? ++par : ++imp;
                  
            x -= dig;
            x /= 10;
        }

        System.out.println("Digitos pares = " + par);
        System.out.println("Digitos pares = " + imp);

    }
}
